package com.sdry.web.controller.hpf;

import java.util.List;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import com.sdry.model.hpf.DepartmentMana;
import com.sdry.service.hpf.MemberService;
import com.sdry.utils.ResponseUtil;

import net.sf.json.JSONArray;

@RequestMapping(value="/memberMana")
@Controller
public class MemberController {

	@Resource
	private MemberService memberService;
	
	/**
	 * 所有部门以及人员
	 * @param response
	 * @throws Exception 
	 */
	@RequestMapping(value="/listAllUser")
	public void listAllUser(HttpServletResponse response) throws Exception{
		List<DepartmentMana> dList = memberService.listAllUser();
		//将对象转化为json数组
        JSONArray json = JSONArray.fromObject(dList);
		ResponseUtil.write(response, json);
	}
}
